import { ServiceItem } from '../../svc/vms';
interface ListReq {
  name?: string;
  namespace?: string;
}

interface ListResp {
  total: number;
  items: ConfigMap[];
}

interface ConfigMapItem {
  metadata: {
    name: string;
    namespace: string;
    creationTimestamp: string;
  };
  data: {}
}
interface ConfigMap {
  conf_name: string;
  namespace: string;
  create_time: string;
  cm: ConfigMapItem;
}

interface CreateReq {
  name: string;
  namespace: string;
  data: {}
}

interface UpdateReq {
  name: string;
  namespace: string;
  data: {}
}

interface CreateResp {
  info: ConfigMapItem;
  is_ok: boolean;
  name: string;
}


interface GetReq {
  name?: string;
  namespace?: string;
}

interface GetResp {
  deployment: ConfigMapItem
}
interface DeleteReq {
  name?: string;
  namespace?: string;
}

interface UpdateResp {
  cm: ConfigMapItem
}

export default ConfigMap;
export {
  ConfigMap,
  ListReq,
  ListResp,
  CreateReq,
  CreateResp,
  ConfigMapItem,
  DeleteReq,
  GetReq,
  GetResp,
  UpdateReq,
  UpdateResp
};
